package zhongbo.java.air.dictionary.web.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

@ApiModel("机场信息请求参数")
public class AirportDto {
    
    @ApiModelProperty("ID (更新时必填)")
    private String id;

    @NotBlank(message = "ICAO代码不能为空")
    @Size(min = 4, max = 4, message = "ICAO代码必须是4个字符")
    @ApiModelProperty(value = "ICAO机场代码", required = true, example = "ZBAA")
    private String icaoCode;

    @NotBlank(message = "IATA代码不能为空")
    @Size(min = 3, max = 3, message = "IATA代码必须是3个字符")
    @ApiModelProperty(value = "IATA代码", required = true, example = "PEK")
    private String iataCode;

    @NotBlank(message = "机场名称不能为空")
    @ApiModelProperty(value = "机场全称", required = true, example = "北京首都国际机场")
    private String name;

    @NotNull(message = "纬度不能为空")
    @ApiModelProperty(value = "纬度", required = true, example = "40.080111")
    private BigDecimal latitude;

    @NotNull(message = "经度不能为空")
    @ApiModelProperty(value = "经度", required = true, example = "116.584556")
    private BigDecimal longitude;

    @NotBlank(message = "状态不能为空")
    @Pattern(regexp = "OPERATIONAL|CLOSED|RESTRICTED", message = "状态必须是OPERATIONAL、CLOSED或RESTRICTED之一")
    @ApiModelProperty(value = "状态", required = true, allowableValues = "OPERATIONAL,CLOSED,RESTRICTED", example = "OPERATIONAL")
    private String status;

    @NotBlank(message = "时区不能为空")
    @ApiModelProperty(value = "时区", required = true, example = "Asia/Shanghai")
    private String timezone;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIcaoCode() {
        return icaoCode;
    }

    public void setIcaoCode(String icaoCode) {
        this.icaoCode = icaoCode;
    }

    public String getIataCode() {
        return iataCode;
    }

    public void setIataCode(String iataCode) {
        this.iataCode = iataCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public void setLatitude(BigDecimal latitude) {
        this.latitude = latitude;
    }

    public BigDecimal getLongitude() {
        return longitude;
    }

    public void setLongitude(BigDecimal longitude) {
        this.longitude = longitude;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getTimezone() {
        return timezone;
    }

    public void setTimezone(String timezone) {
        this.timezone = timezone;
    }
}